1: | app(app(app(comp,f),g),x) | → app(f,app(g,x)) | |
2: | app(twice,f) | → app(app(comp,f),f) | |
3: | APP(app(app(comp,f),g),x) | → APP(f,app(g,x)) | |
4: | APP(app(app(comp,f),g),x) | → APP(g,x) | |
5: | APP(twice,f) | → APP(app(comp,f),f) | |
6: | APP(twice,f) | → APP(comp,f) | |